# -*- coding: utf-8 -*-
from odoo import http


class StudentQingmingTan(http.Controller):
    @http.route('/student_qingming_tan/student_qingming_tan/', auth='public')
    def index(self, **kw):
        return "Hello, world"

    @http.route('/student_qingming_tan/student_qingming_tan/objects/', auth='public')
    def list(self, **kw):
        return http.request.render('student_qingming_tan.listing', {
            'root': '/student_qingming_tan/student_qingming_tan',
            'objects': http.request.env['student_qingming_tan.student_qingming_tan'].search([]),
        })

    @http.route('/student_qingming_tan/student_qingming_tan/objects/<model("student_qingming_tan.student_qingming_tan"):obj>/', auth='public')
    def object(self, obj, **kw):
        return http.request.render('student_qingming_tan.object', {
            'object': obj
        })
